package com.javablog.dto;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

@Data
public class CommentDto {
    
    private Long id;
    
    @NotBlank(message = "评论内容不能为空")
    @Size(min = 1, max = 1000, message = "评论内容长度必须在1到1000个字符之间")
    private String content;
    
    private Long articleId;
    
    private Long parentId;
    
    private UserSummaryDto user;
    
    private List<CommentDto> replies = new ArrayList<>();
    
    private int likes;
    
    private int dislikes;
    
    private LocalDateTime createdAt;
    
    private LocalDateTime updatedAt;
} 